#include <cstddef>
#include <array>
#include <cstdlib>
#include <cmath>
#define ALIGNMENT 8
#define MAX_BYTES 256 * 1024
#define MAX_FREE_LIST_SIZE MAX_BYTES / ALIGNMENT

class SizeClass
{
public:
    static size_t roundUp(size_t bytes)
    {
        return (bytes + ALIGNMENT - 1) & ~(ALIGNMENT - 1);
    }

    static size_t getIndex(size_t size)
    {
        return (size + ALIGNMENT - 1) / ALIGNMENT - 1;
    }
};